package dryven.persistence.provider.hibernate;


import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.hibernate.ejb.HibernatePersistence;
import dryven.config.DatabaseConfigurationSource;

public class HibernatePersistenceProvider extends C3P0PersistenceProvider {
	
	public HibernatePersistenceProvider(DatabaseConfigurationSource dbSourceCfg) {
		super(dbSourceCfg);
	}

	protected Class<? extends javax.persistence.spi.PersistenceProvider> getPersistenceProviderClass() {
		return HibernatePersistence.class;
	}

	@Override
	protected Map getProviderProperties() {
		Map<String,String> m = new HashMap<String, String>();
		m.put("hibernate.show_sql", "false");

		//m.put("hibernate.bytecode.use_reflection_optimizer", "false");
		//m.put("hibernate.bytecode.provider", "javassist");
		return m;
		//return null;
	}
	
	
}
